<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>算数运算符</title>
</head>
<body>
<button onclick="funAdd()">加法</button>
<button onclick="funSub()">减法</button>
<button onclick="funMul()">乘法</button>
<button onclick="funDiv()">除法</button>
<button onclick="funPower()">幂运算</button>
<button onclick="funRem()">取余</button>
</body>
<script>
    //加法
    function funAdd() {
        var a = 5 + 8
        console.log(a)
    }

    // 减法
    function funSub() {
        var a = 5 - 8
        console.log(a)
    }

    // 乘法
    function funMul() {
        var a = 5 * 8
        console.log(a)
    }

    // 除法
    function funDiv() {
        var a = 40 / 8
        console.log(a)
    }

    // 幂运算
    function funPower() {
        var a = 5 ** 2
        console.log(a)
    }

    // 取余
    function funRem() {
        var a = 8 % 5  // 取余  取模
        console.log(a)
    }
</script>
</html>